package com.blockchain.nodes.manager.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.blockchain.nodes.manager.mapper.TransactionFlowMapper;
import com.blockchain.nodes.manager.domain.TransactionFlow;
import com.blockchain.nodes.manager.service.ITransactionFlowService;
import com.blockchain.nodes.common.support.Convert;

/**
 * 交易流水 服务层实现
 * 
 * @author Gene Max
 * @date 2019-03-08
 */
@Service
public class TransactionFlowServiceImpl implements ITransactionFlowService 
{
	@Autowired
	private TransactionFlowMapper transactionFlowMapper;

	/**
     * 查询交易流水信息
     * 
     * @param id 交易流水ID
     * @return 交易流水信息
     */
    @Override
	public TransactionFlow selectTransactionFlowById(Long id)
	{
	    return transactionFlowMapper.selectTransactionFlowById(id);
	}
	
	/**
     * 查询交易流水列表
     * 
     * @param transactionFlow 交易流水信息
     * @return 交易流水集合
     */
	@Override
	public List<TransactionFlow> selectTransactionFlowList(TransactionFlow transactionFlow)
	{
	    return transactionFlowMapper.selectTransactionFlowList(transactionFlow);
	}
	
    /**
     * 新增交易流水
     * 
     * @param transactionFlow 交易流水信息
     * @return 结果
     */
	@Override
	public int insertTransactionFlow(TransactionFlow transactionFlow)
	{
	    return transactionFlowMapper.insertTransactionFlow(transactionFlow);
	}
	
	/**
     * 修改交易流水
     * 
     * @param transactionFlow 交易流水信息
     * @return 结果
     */
	@Override
	public int updateTransactionFlow(TransactionFlow transactionFlow)
	{
	    return transactionFlowMapper.updateTransactionFlow(transactionFlow);
	}

	/**
     * 删除交易流水对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTransactionFlowByIds(String ids)
	{
		return transactionFlowMapper.deleteTransactionFlowByIds(Convert.toStrArray(ids));
	}
	
}
